<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>忘记密码</title>
	<link rel="stylesheet" href="__CSS__/base.css">
	<link rel="stylesheet" href="__CSS__/style.css">
	<script src="__CDN_JQ__"></script>
	<script src="__LAYER__/layer.js"></script>
	<script>
        function check(){
        	var password = $('#password').val();
        	var password1 = $('#password1').val();
        	if (password == '') {
        		layer.tips('请输入新密码!', '#password');
        		return false;
        	};
        	if(!/^(\w){6,20}$/.test(password)){
		        layer.tips('密码格式不对!', '#password');
		        return false;
		    };  
        	if (password1 == '') {
        		layer.tips('请再次输入新密码!', '#password1');
        		return false;
        	};
        	if (password1 != password) {
        		layer.tips('两次密码不一致!', '#password1');
        		return false;
        	};
        }
	</script>
</head>
<body>
	<!--头部-->
	<div class="regiup-header w clearfix">
		<div class="regiup-headerLeft">
			<a href="{:U('Index/index')}" class="logo fl">
				<h2>亿速网络</h2>
				<div></div>
			</a>
			<h4 class="fl">找回密码</h4>
		</div>
	</div>
	<div class="regiup-sectionPt">
		<div class="regiup-section w">
			<!--栏目状态-->
			<ul class="regiup-dataColumn clearfix">
				<li class="fl clearfix">
					<em class="fl">1</em>
					<span class="fl">确认密码</span>
					<i></i>
				</li>
				<li class="fl clearfix">
					<em class="fl">2</em>
					<span class="fl">验证身份</span>
					<i></i>
				</li>
				<li class="fl clearfix active">
					<em class="fl active">3</em>
					<span class="fl">设置密码</span>
					<i></i>
				</li>
				<li class="fl clearfix">
					<em class="fl">4</em>
					<span class="fl">完成</span>
					<i></i>
				</li>
			</ul>
			<!--设置用户名-->
			<div class="regiup-form-main one w active">
				<form action="{:U('Public/complete')}" method="post" onsubmit="return check()">
					<div class="container">
						<div class="one clearfix">
							<div class="fl">新登录密码：</div>
							<div class="fr">
								<input type="password" name="password" id="password" placeholder="只能输入6-20个字母、数字、下划线" class="txt">
							</div>
						</div>
						<div class="one clearfix">
							<div class="fl">确认新登录密码：</div>
							<div class="fr">
								<input type="password" id="password1" class="txt">
							</div>
						</div>
						<div class="three">
						    <input type="hidden" name="id" id="id" value="{$id}">
							<input type="submit" value="下一步" id="user-btn">
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<!--底部-->
	<ul class="regi-footer">
		<li>
			<a href="javascript:;">关于我们</a>
			<a href="javascript:;">联系我们</a>
			<a href="javascript:;">加盟我们</a>
			<a href="javascript:;">商城APP</a>
			<a href="javascript:;" class="active">友情链接</a>
		</li>
		<li>
			<span>{$record_number}</span>
			<span class="active">有任何问题请联系我们在线客服 电话：{$intnet_phone}</span>
		</li>
		<li>© 20016-2018 亿速网络用品 版权所有，并保留所有权利</li>
	</ul>
</body>
<script>
	$('#password').bind('blur', function(){
		var password = $('#password').val();
		if (password == '') {
			layer.tips('请填写密码!','#password');
			return false;
		};
		if (password.length<6) {
			layer.tips('密码不能小于6位!','#password');
			return false;
		};
		if (password.length>20) {
			layer.tips('密码不能大于20位!','#password');
			return false;
		};
		if (/^(?:\d+|[a-zA-Z]+|[!@#$%^&*]+)$/.test(password)) {
            layer.tips('密码强度弱,有盗号风险!','#password');
		}else if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&*]+$)(?![\d!@#$%^&*]+$)[a-zA-Z\d!@#$%^&*]+$/.test(password)) {
			layer.tips('密码强度强!','#password');
		}else if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*]+$)[a-zA-Z\d!@#$%^&*]+$/.test(password)) {
			layer.tips('密码强度中!','#password');
		};	
		return true;
	}); 
</script>
</html>